home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmPass
- BorderStyle = 3 'Fixed Dialog
- Caption = "Enter password"
- ClientHeight = 1935
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 5535
- Icon = "frmPass.frx":0000
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 1935
- ScaleWidth = 5535
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 'CenterScreen
- Begin VB.Timer tmrOkEnabler
- Interval = 10
- Left = 120
- Top = 1080
- End
- Begin VB.CommandButton cmdCancel
- Cancel = -1 'True
- Caption = "C&ancel"
- Height = 735
- Left = 2760
- TabIndex = 5
- Top = 1080
- Width = 1935
- End
- Begin VB.CommandButton cmdOk
- Caption = "&Ok"
- Height = 735
- Left = 840
- TabIndex = 4
- Top = 1080
- Width = 1935
- End
- Begin VB.TextBox txtPass
- Height = 375
- IMEMode = 3 'DISABLE
- Index = 1
- Left = 1920
- PasswordChar = "*"
- TabIndex = 3
- Top = 600
- Width = 3495
- End
- Begin VB.TextBox txtPass
- Height = 360
- IMEMode = 3 'DISABLE
- Index = 0
- Left = 1920
- PasswordChar = "*"
- TabIndex = 1
- Top = 120
- Width = 3495
- End
- Begin VB.Label lblConfirm
- Alignment = 1 'Right Justify
- Caption = "&Confirm password"
- Height = 375
- Left = 120
- TabIndex = 2
- Top = 600
- Width = 1695
- End
- Begin VB.Label lblEnter
- Alignment = 1 'Right Justify
- Caption = "Enter &password"
- Height = 375
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 1695
- End
- Attribute VB_Name = "frmPass"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdCancel_Click()
- 'unload forms from memory
- Unload frmLock
- Unload frmPass
- 'end program
- End Sub
- Private Sub cmdOk_Click()
- 'since OK is only enabled if passwords are the same and
- 'not blank, go straight to locked screen
- 'start the flashing timer
- frmLock.tmrLockedFlash.Interval = 500
- 'close this form, load other form
- frmLock.Show
- frmPass.Hide
- End Sub
- Private Sub tmrOkEnabler_Timer()
- 'must have a password - if any fields blank keep
- 'OK disabled
- If txtPass(0).Text = "" Or txtPass(1).Text = "" Then
- 'only disable if not already disabled
- If cmdOk.Enabled <> False Then cmdOk.Enabled = False
- Exit Sub
- End If
- If txtPass(0).Text = txtPass(1).Text Then
- 'enable OK if passwords are the same
- 'only enable if not already enabled
- If cmdOk.Enabled <> True Then cmdOk.Enabled = True
- 'disable OK if passwords are different
- 'only disable if not already disabled
- If cmdOk.Enabled <> False Then cmdOk.Enabled = False
- End If
- End Sub
-